import { SyncBailHook } from 'tapable';
import { IPSModelObject } from '../../../exports';

/**
 * 全局钩子
 *
 * @author chitanda
 * @date 2022-03-07 18:03:22
 * @export
 * @class GlobalHooks
 */
export class GlobalHooks {
  /**
   * 获取模型调用钩子
   *
   * @author chitanda
   * @date 2022-03-07 18:03:27
   * @static
   * @type {SyncBailHook<[model: IPSModelObject, cls: string, obj: IModel, tag?: string], IPSModelObject | undefined>}
   */
  static getModel4: SyncBailHook<[model: IPSModelObject, cls: string, obj: IModel, tag?: string], IPSModelObject | undefined> = new SyncBailHook(['model', 'cls', 'obj', 'tag']);

  /**
   * 查找子模型调用钩子
   *
   * @author chitanda
   * @date 2022年10月20日11:41:48
   * @static
   * @type {SyncBailHook<[model: IPSModelObject, cls: string, obj: IModel, tag?: string], IPSModelObject | undefined>}
   */
  static getChildPSModelObject: SyncBailHook<[model: IPSModelObject, cls: string, obj: IModel, tag?: string], IPSModelObject | undefined> = new SyncBailHook(['model', 'cls', 'obj', 'tag']);
}
